package com.ysx.service;

import com.ysx.bean.ScottRoleBean;
import com.ysx.dao.ScottRoleDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleServiceImpl  implements RoleService{

    @Autowired
    private ScottRoleDao dao;

    @Override
    public ScottRoleBean findById(Integer id) {
        ScottRoleBean bean = new ScottRoleBean();
        bean.setId(id);
        return dao.selectOne(bean);
    }

    @Override
    public int add(ScottRoleBean bean) {
        return dao.insert(bean);
    }
}
